@extends('admin.layouts.index')
@section('title', '用户提现记录')

@section('content')
<div class="row">
    <div class="col-md-12">
        <div class="card">
            <div class="card-body">
                <form class="m-search" method="GET" action="{{ URL::current() }}">
                    <div class="m-search-items">
                        <div class="m-search-item">
                            <label>提现状态</label>
                            <select name="status">
                                <option value="2">已提现成功</option>
                                <option value="1">未提现成功</option>    
                            </select>
                        </div>
                        <div class="m-search-item">
                            <button class="button">立即搜索</button>
                        </div>
                    </div>
                </form>
                <table class="table table-bordered">
                    <thead>
                        <tr>
                            <th scope="col">支付宝名称</th>
                            <th scope="col">支付宝</th>
                            <th scope="col">提现金额</th>
                            <th scope="col">状态</th>
                            <th scope="col">提现时间</th>
                            <th scope="col">操作</th>
                        </tr>
                    </thead>
                    <tbody>
                        @forelse($userswithdrawals as $userswithdrawal)
                        <tr>
                            <td>{{ $userswithdrawal->name }}</td>
                            <td>{{ $userswithdrawal->alipay }}</td>
                            <td>¥{{ $userswithdrawal->money }}</td>
                            @if($userswithdrawal->status == 1)
                            <td class="text-default">未成功</td>
                            @else
                            <td class="text-success">已成功</td>
                            @endif
                            <td>{{ $userswithdrawal->created_at  }}</td>
                            <td>
                                <a class="text-primary" href="{{ url('/admin/users/users_detial',['id'=>$userswithdrawal->users_id]) }}">用户详情</a>
                            </td>
                        </tr>
                        @empty
                        <tr>
                            <td>暂无开票数据</td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                            <td></td>
                        </tr>
                        @endforelse
                    </tbody>
                </table>
                <div class="pagination-container">
                    {!! $userswithdrawals->appends($condition)->render() !!}
                </div>
            </div>
        </div>
    </div>
</div>

@endsection
